﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<brjostagjof.Models.TopTenArticles>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Brjóstagjöf.is
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

   <% foreach (var item in Model) { %>
            <h2 class="title"><a href="<%: item.catLink %><%: item.ID %>"><%: item.headline %></a></h2>
            <p class="meta">Höfundur: <a href="../../MySite/ViewUserByID/<%: item.auhtorID %>"><%: item.skrifadAf %></a>,  <%: item.date %> 
	            &nbsp;&bull;&nbsp;
               <%  int count = brjostagjof.Controllers.HomeController.GetCommentsCountByArticleBaseID(item.ID); %>
                Umsagnir  (<%: count %>) &nbsp;&bull;&nbsp;
                <%: item.category %></p>
            
            <div class="entry">
            <div class="entry-bgtop">
            <div class="entry-bgbtm">
                <p><%= item.context%> </p>
                <a href="<%: item.catLink %><%: item.ID %>" class="links">Lesa meira</a>
            </div>
            </div>
            </div>
            <%  } %>
</asp:Content>